package com.example.finallyjob.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

@ApiModel("消息类")
@Document(collection = "info")
public class Info {
    @Transient
    private int idinfo;
    @ApiModelProperty("消息发送用户名")
    private String name;
    @ApiModelProperty("消息类型")
    private String kind;
    @ApiModelProperty("消息内容")
    private String info_content;
    @ApiModelProperty("消息题目")
    private String title;
    @ApiModelProperty("作品类别")
    private String article_kind;
    @ApiModelProperty("发送时间")
    @JsonFormat(shape =JsonFormat.Shape.STRING,pattern ="yyyy-MM-dd",timezone ="GMT+8")
    private Date date;
    @ApiModelProperty("接信者id")
    private int userid;

    public Info(String name, String kind, String info_content,
                String title, String article_kind, Date date, int userid) {
        this.name = name;
        this.kind = kind;
        this.info_content = info_content;
        this.title = title;
        this.article_kind = article_kind;
        this.date = date;
        this.userid = userid;
    }

    public int getUserid() {
        return userid;
    }

    public void setUserid(int userid) {
        this.userid = userid;
    }

    public int getIdinfo() {
        return idinfo;
    }

    public void setIdinfo(int idinfo) {
        this.idinfo = idinfo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    public String getInfo_content() {
        return info_content;
    }

    public void setInfo_content(String info_content) {
        this.info_content = info_content;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getArticle_kind() {
        return article_kind;
    }

    public void setArticle_kind(String article_kind) {
        this.article_kind = article_kind;
    }
}
